Results 1 to 5 of 5

Thread: BCP giving error "unexpected eof"

  1. #1
    Ajay Guest

    BCP giving error "unexpected eof"

    Hi ,

    I am trying to import a .csv file to SQL server 6.5, I get the db library error "Unexpected EOF encountered in BCP data-file"

    What can be the problem with the file ?
    Its very important to load this data.

    Any help is appreciated.

    Thanks
    Ajay


  2. #2
    Gregory Guest

    BCP giving error "unexpected eof" (reply)

    1) look for 'common bcp issues' in books online

    2) in bcp format file, change data type to SQLCHAR


    ------------
    Ajay at 3/19/99 11:29:33 AM

    Hi ,

    I am trying to import a .csv file to SQL server 6.5, I get the db library error "Unexpected EOF encountered in BCP data-file"

    What can be the problem with the file ?
    Its very important to load this data.

    Any help is appreciated.

    Thanks
    Ajay


  3. #3
    Brett Guest

    BCP giving error "unexpected eof" (reply)


    Ajay,

    I would try to bring everything in as a straight VARCHAR. Nothing fancy until after it is in the table.

    Then let us know what happens

  4. #4
    Ajay Guest

    BCP giving error "unexpected eof" (reply)


    Hi ,

    Thanks for the reply,

    I could not bring every thing in VARCHAR as one of my field size is greater than that of 255. So I am putting it as text.

    Regards
    Ajay

    ------------
    Brett at 3/19/99 1:43:29 PM


    Ajay,

    I would try to bring everything in as a straight VARCHAR. Nothing fancy until after it is in the table.

    Then let us know what happens

  5. #5
    Kenneth Wilhelmsson Guest

    BCP giving error "unexpected eof" (reply)

    I would think its your 255+ between separators that's giving you the "EOF" message. I might be wrong, but I think that bcp wants the bytesize for text/image data.

    I would try to separate the 255+ column/s from your file, bcp in whats left as normal in a worktable, create another worktable with a text column and and use TEXTCOPY.EXE (found in MSSQLBINN) for the wide column.

    As I haven't had the opportunity to try this out, I can't say how hard/easy this approach would be, but I think it would work.

    /Kenneth


    ------------
    Ajay at 3/19/99 2:03:54 PM


    Hi ,

    Thanks for the reply,

    I could not bring every thing in VARCHAR as one of my field size is greater than that of 255. So I am putting it as text.

    Regards
    Ajay

    ------------
    Brett at 3/19/99 1:43:29 PM


    Ajay,

    I would try to bring everything in as a straight VARCHAR. Nothing fancy until after it is in the table.

    Then let us know what happens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •